#pragma once

#include "../dep/include/openssl/hmac.h"
#include "StdAfx.h"
#include "BigNumber.h"

namespace Crypt {

class HMAC
{
public:
    HMAC();
    ~HMAC();

    void UpdateFinalizeBigNumbers(BigNumber *bn0, ...);
    void UpdateBigNumber(BigNumber *bn0, ...);

    void UpdateData(const uint8* dta, int32 len);
    void UpdateData(const std::string& str);

    void Initialize(uint32 len, uint8* seed);
    void Finalize();

    uint8* GetDigest(void) { return mDigest; };
    int32 GetLength(void) { return 20; };

    BigNumber GetBigNumber();

private:
    HMAC_CTX mC;
    uint8 mDigest[20];
};

};